// @ts-ignore
import request from '@/utils/request';

// 获取分页数据
export function getListByPageAPI(params) {
    return request({
        url: '/center/rightInfo/list',
        method: 'get',
        params,
    });
}

// 新增
export function addAPI(data) {
    return request({
        url: '/center/rightInfo/add',
        method: 'post',
        data,
    });
}

// 根据id查询
export function getByIdAPI(id) {
    return request({
        url: '/center/rightInfo/view',
        method: 'get',
        params: { id },
    });
}
//查询全平台唯一一条权限数据
export function findOne() {
    return request({
        url: '/center/rightInfo/findOne',
        method: 'get',
    });
}

// 编辑
export function updateAPI(data) {
    return request({
        url: '/center/rightInfo/update',
        method: 'post',
        data,
    });
}

// 删除
export function delAPI(data) {
    return request({
        url: '/center/rightInfo/delete',
        method: 'post',
        data,
    });
}
